const gulp = require('gulp');
const sass = require('gulp-sass');
const compass = require("gulp-compass");
const cleancss = require('gulp-clean-css');



gulp.task("sass",sass2css);
gulp.task("sass:watch",function(){
    gulp.watch("./src/sass/**/*.scss",sass2css)
})
gulp.task("default",['sass','sass:watch']);






function sass2css(){
    // gulp.src("./src/sass/**/*.scss")
    // .pipe(sass())
    // .pipe(cleancss())
    // .pipe(gulp.dest('./dest/css/'))
    gulp.src("./src/sass/**/*.scss")
    .pipe(compass({
        config_file: './config.rb',
        css: 'src/css',
        sass: 'src/sass',
    }))
   // .pipe(cleancss())
    .pipe(gulp.dest('./dest/css/'))
}